/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lector;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

/**
 *
 * @author Educacionit
 */
public class Lector {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
      File archivo = new File("archivo");
      
//      System.out.println(archivo.getAbsolutePath());
        System.out.println(archivo.exists());

        FileReader in = null;
        BufferedReader reader = null;

        try {
        in = new FileReader(archivo);
        reader = new BufferedReader(in);

        while(reader.ready()){
            char c = (char) reader.read();
            System.out.print(c);
        }

        } catch (Exception e) {
           e.printStackTrace();
        }
        finally {
            reader.close();
            in.close();
        }
    }

}
